﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>流程查询</title>
    <script type="text/javascript" src="/WF/Scripts/bootstrap/js/jquery.min.js"></script>
    <script src="/WF/Scripts/QueryString.js" type="text/javascript"></script>
    <link href="/DataUser/Style/ccbpm.css" rel="stylesheet" type="text/css" />
    <!-- 引用通用的js文件. -->
    <script type="text/javascript" src="/WF/Scripts/config.js"></script>
    <script type="text/javascript" src="/WF/Comm/Gener.js"></script>
    <script type="text/javascript" language="javascript">

        //页面启动函数.
        $(function () {

            //加载表单字段。
            var ens = new Entities("BP.Cloud.Template.Flows");
            ens.RetrieveAll();

            var cols = 4; //列数.
            var colIdx = -1;

            var html = "<table style='width:100%;'>";
            for (var i = 0; i < ens.length; i++) {
                var en = ens[i];
                colIdx++;
                if (colIdx == 0)
                    html += "<tr>";
                html += "<td>" + en.Name + "</td>";

                if (colIdx == cols - 1) {
                    html += "</tr>";
                    colIdx = -1;
                }
            }

            //处理输出余下的部分.
            if (colIdx != -1) {
                while (true) {
                    html += "<td></td>";
                    colIdx++;
                    if (colIdx == cols - 1)
                        html += "</tr>";
                    break;
                }
            }

            html += "</table>";
            $("#flows").append(html);
        });

        function ThisWeek() {
            var dtFrom = '2020-01-01';
            var dtTo = '2020-01-01';
            SearchIt(dtFrom, dtTo);
        }

        function SearchIt(dtFrom, dtTo) {
            var url = "SearchByData.htm?DTFrom=" + dtFrom + "&DTTo=" + dtTo;
            var url = "/CCMobile/Search.htm?EnsName=BP.Cloud.MyJoinFlows";
            var url = "/CCMobile/Comm/Search.htm?EnsName=BP.Cloud.MyJoinFlows&RDTFrom=" + dtFrom + "&RDTTo=" + dtTo;
            SetHref(url);
        }
    </script>
</head>
<body>

    关键字:<input type="text" id="TB_Key" /> <button>查询</button>

    <br />
    [<a href="javascript:ThisWeek();">本周</a>]
    [<a href="javascript:PrvWeek();">上周</a>]
    [<a href="javascript:ThisMonth();">本月</a>]
    [<a href="javascript:PivMonth();">上月</a>]
    [<a href="javascript:PivPivMonth();">上上个月</a>]
    [<a href="javascript:More();">更早</a>]
    <br />

    <div id="flows"></div>

</body>
</html>